﻿@{
    ViewBag.Title = "Menu Master";
    Layout = Settings.DefaultLayout();
    IQueryable<LeadCRM.Entities.Menu> data = ViewBag.MenuData;
}

@section scripts
{
    @Scripts.Render("~/Scripts/Models/MenuMaster.js")
    <script>
        $(document).ready(function () {
            $("#CusType").validate();
        });
    </script>
}

<h2>Menu Master</h2>


<button class="btn" onclick="AddCustomerType('','0','New Customer Type')">Add New Menu</button>
<br />
<br />


<table class="table table-bordered">
    <thead>
        <tr>
            <th>Menu ID
            </th>
            <th>Description
            </th>
            <th>Menu Name
            </th>
            <th>URL
            </th>
            <th>Edit
            </th>
            <th>Delete
            </th>
        </tr>
        @foreach (var item in data)
        {
            <tr>
                <td>
                    @item.MenuID
                </td>
                <td>
                    @item.Description
                </td>
                <td>
                    @item.MenuName
                </td>
                <td>
                    @item.MenuURL
                </td>

                <td>

                    @Html.ActionLink("Edit",
                        "EditMenuMaster",
                        "Masters",
                        new { id = item.MenuID },
                        new { @class = "btn btn-primary" }
                    )

                </td>
                <td>
                    <a href="#" class="btn btn-danger">Delete</a>
                </td>
            </tr>
        }
    </thead>
</table>
